package de.andreavicentini.teatralia.pages;

import org.magiclabs.htmlx.Area;
import org.magiclabs.htmlx.SiteModel;

import de.andreavicentini.teatralia.generate.TeatraliaCSS;
import de.andreavicentini.teatralia.pages.contact.ContactPage;
import de.andreavicentini.teatralia.pages.events.EventsModel;
import de.andreavicentini.teatralia.pages.events.EventsPage;
import de.andreavicentini.teatralia.pages.home.HomePage;
import de.andreavicentini.teatralia.pages.links.LinksPage;
import de.andreavicentini.teatralia.pages.members.MembersModel;
import de.andreavicentini.teatralia.pages.members.MembersPage;
import de.andreavicentini.teatralia.pages.repertoire.AuthorsModel;
import de.andreavicentini.teatralia.pages.repertoire.PlaysModel;
import de.andreavicentini.teatralia.pages.repertoire.RepertoirePage;

public class TeatraliaSiteModel extends SiteModel {

	public final HomePage home;
	public final ContactPage contact;
	public final MembersPage members;
	public final EventsPage events;
	public final EventsPage galleries;
	public final RepertoirePage repertoire;
	public final LinksPage links;
	
	
	public TeatraliaSiteModel() {
		AuthorsModel authors = new AuthorsModel();
		PlaysModel plays = new PlaysModel(authors);
		EventsModel eventsModel = new EventsModel(plays);
		MembersModel membersModel = new MembersModel();
		
		Style style = new Style.WithoutWindowsOnWhiteBackgroundColors();
//		Style style = new Style.WhiteBackgroundColors();
//		Style style = new Style.OldColors();
		
		Area area = new Area("Default", style.getLayout(), this);
		
		new StylePage(new TeatraliaCSS(), "teatralia CSS", area, style);
		
		home = new HomePage(area);
		contact = new ContactPage(area);
		members = new MembersPage(area, membersModel);
		events = new EventsPage(area, "Events", "events", eventsModel.listNextEvents());
		galleries = new EventsPage(area, "Galleries", "galleries", eventsModel.listPastEvents());
		repertoire = new RepertoirePage(area, authors, plays);
		links = new LinksPage(area);
		
	}
}
